<!DOCTYPE html>
<html>
<head lang="zh">
    <meta charset="UTF-8">
    <title>Counter</title>
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
</head>
<body>

<div>
    <span id="counter_container_page"> 本页总阅读 <span id="counter_value_page"></span>次 </span> <br>
    <span id="counter_container_site"> 本站共到访 <span id="counter_value_site"></span>次 </span>
</div>

<!--try{jQuery200021154401325571814_1425737125457({"page": 62,"site": 63 });}catch(e){}-->

<script type="text/javascript">
    $(function () {
        var pageValue = $('#counter_value_page');
        var siteValue = $('#counter_value_site');

        var k = 0;
        if (pageValue.length > 0) k += 1;
        if (siteValue.length > 0) k += 2;

        $.ajax({
            type: 'GET',
            url: '//127.0.0.1:9527/counter?k=' + k,
            dataType: 'jsonp',
            jsonp: 'jsonpCallback',
            success: function (data) {
                var json = eval(data);
                pageValue.text(json.page);
                siteValue.text(json.site);
            },
            error: function () {
                $('#counter_container_page').html("");
                $('#counter_container_site').html("");
            }
        });
    });

</script>


</body>
</html>